<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script>
  <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
  <style>
    html,body{
      padding: 0;
      margin: 0;
    }
    #box{
      /* height: 101vh; */
      /* background: yellow; */
    }
    .old_box{
      width: 100px;
      height: 100px;
      background: red;
    }
    .new_box{
      width: 100px;
      height: 100px;
      background: yellow;
    }
  </style>
</head>
<body>
  <div id="box">
    <div class="old_box"></div>
    <div class="new_box"></div>
  </div>
  <script>
    new Vue({
      el:"#box",
      data(){
        return{
          
        }
      },
      mounted() {
        // window.addEventListener("load",()=>{
        //   alert("123")
        // })
        window.addEventListener("scroll",this.scrollEvent)
      },
      methods: {
        scrollEvent(){
          console.log("zzc")
        }
      },
    })
  </script>
</body>
</html>